<!--This file is the User Interface only for updating the user's password-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<?php
session_start();
$username = $_SESSION['username'];
?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Rotaract DLSU</title>
        <meta http-equiv="Content-Type" content="text/html"/>
        <meta name="robots" content="index,follow"/>
        <meta name="distribution" content="global"/>
        <meta name="description" content=""/>
        <meta name="keywords" content=""/>
        <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
        <script type="text/javascript" src="javascript/RegistrationValidation.js"></script>
    </head>
    <body>
        <!--        This part is the user interface-->
        <div id="container2">
            <div id="main2">
                <table width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="main_nav">
                            <div id="main_text2">
                                <form id="updateinfo" action="RAC-UpdatePasswordUI.php" method="POST">
                                    <table cellpadding="2" cellspacing="0" border="0">
                                        <p>*Password should be at least 8 characters. <br/><br/><br/></p>
                                        <tr><td><p>Enter New Password:</p></td><td><input name="password" type="password" size="15" /><label id="errorpassword" style="color: red;"></label></td></tr>
                                        <tr><td><p>Confirm Password:</p></td><td><input name="password2" type="password" size="15" /><label id="errorpassword2" style="color: red;"></label></td></tr>
                                        <tr><td><input type="submit" name="submit" value="Submit" onClick="return changePassword(this.form);"/></td></tr>
                                        
                                    </table>
                                    
                                </form>
                                
<!--                            Printing the confirmation message.
                                $confirm variable comes from the Logic file which is the RAC-UpdatePassword.php-->
                                <?php
                                
                                $confirm = '';
                                
                                if (isset($_POST['submit'])){
                                include 'RAC-UpdatePassword.php';
                                
                                if($confirm){
                                    echo "<h4>Change Password Successful!</h4>";
                                }  
                                }
                                ?>
                                    
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </body>
</html>
